<template>
  <div class="wrap">
    <div class="title">
      <slot name="beforeTitle" />
      {{ text || title || label }}
    </div>
    <slot />
  </div>
</template>

<script>
export default {
  props: {
    text: {
      type: String,
      default: '',
    },
    title: {
      type: String,
      default: '',
    },
    label: {
      type: String,
      default: '',
    },
  },
};
</script>

<style lang="scss" scoped>
.wrap {
  display: flex;
  margin-bottom: 8px;
  justify-content: space-between;
  align-items: center;
  .title {
    display: flex;
    align-items: center;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 24px;
    font-size: 16px;
  }
}
</style>
